<script src="tpl.js" type="text/javascript"></script><textarea id="code" style="width:80%;height:300px;">{macro test(args)}{/macro}</textarea><input type="submit" onclick="test_tpl()" /><script stype="text/javascript">	var tpl	= new Template.Smarty();		var pool	= [] ;	Template.tpl_buffer	= function(txt){		alert( txt );	}	window['println']	= alert ;	window['print']	= alert ;		function test_tpl(){		pool	= [] ;		tpl.parse( document.getElementById('code').value );		tpl.process({			env : {				'path': 'c:\\window\\system32',				'os': 'win 32',			},			var1:{				v1_i:123			}		}) ;		//alert ( pool.join("") ) ;	}</script>